﻿using System;
using System.Windows;
using Microsoft.Phone.Controls;
using FeedbackHelperLib;

namespace Starter3DGame
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            Loaded += MainPage_Loaded;

            TileHelper.InitialiseTiles();
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
                AdRotatorControl.Invalidate();
                FeedbackHelper.Default.Initialise("appfeedback@zenithmoon.com");
        }        

        // Simple button Click event handler to take us to the second page
        private void PlayButton_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/GamePage.xaml", UriKind.Relative));
        }

        private void OptionsButton_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/OptionsPage.xaml", UriKind.Relative));
        }

        private void AboutButton_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/AboutPage.xaml", UriKind.Relative));
        }

        protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);
        }

    }
}